<template>
    <div id="zhanshi">
        <table>
            <tr v-for="i in list">
                <td>书名</td>
                <td>价格</td>
                <td>封面</td>
            </tr>
            <tr>
                <td>{{i.name}}</td>
                <td>{{i.price}}</td>
                <td>{{i.img}}</td>
            </tr>
        </table>
        <input type="button" value="按钮" @click="zhu()">
    </div>
</template>
<script>
import {login_zhanshi}  from './axios_api/api.js'
export default {
    name:"zhanshi",
    data(){
        return{
            list:""
        }
    },methods:{
        zhu(){
            login_zhanshi()
            .then(res=>{
                console.log(res)
                this.list = res.data
            })
        }
    }
}
</script>
<style>

</style>